import pygame
import math


def rotate_vector2( v: pygame.Vector2, angle):
    theta = math.radians(angle)
    cs = math.cos(theta)
    sn = math.sin(theta)
    x = v.x * cs - v.y * sn
    y = v.x * sn + v.y * cs
    return pygame.Vector2(x, y)